package com.es;

import com.es.jdbc.JdbcProperties;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@ComponentScan()
@PropertySource("classpath:application.properties")

public class SpringApp {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SpringApp.class);
        JdbcProperties properties = ctx.getBean(JdbcProperties.class);
        System.out.println(properties);
    }
}
